<?php
require_once(dirname(__FILE__).'/../include/common.inc.php');
require_once(DEDEINC.'/userlogin.class.php');

///////
//echo $_SESSION['username'].$_SESSION['password'];

$admindirs = explode('/',str_replace("\\",'/',dirname(__FILE__)));
$admindir = $admindirs[count($admindirs)-1];
$cuserLogin = new userLogin($admindir);
$res = $cuserLogin->checkUser($_SESSION['username'],$_SESSION['password']);

			//success
			if($res==1)
			{
				$cuserLogin->keepUser();
//				if(!empty($gotopage))
//				{
//					ShowMsg('成功登录，正在转向管理管理主页！',$gotopage);
//					exit();
//				}
//				else
//				{
//					ShowMsg('成功登录，正在转向管理管理主页！',"index.php");
//					exit();
//				}
			}

/////////
//exit;
require_once(dirname(__FILE__)."/config.php");
require_once(DEDEINC.'/dedetag.class.php');
$defaultIcoFile = DEDEROOT.'/data/admin/quickmenu.txt';
$myIcoFile = DEDEROOT.'/data/admin/quickmenu-'.$cuserLogin->getUserID().'.txt';
if(!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile;
require(DEDEADMIN.'/inc/inc_menu_map.php');

if($cuserLogin->userType >= 10)
{
	include(DEDEADMIN.'/templets/index2.htm');
	exit();
}
else
{
	include(DEDEADMIN.'/templets/index1.htm');
	exit();
}

?>
